#include "SC_GPIO.h"

void    initGPIO(void)
{
#if defined _SC8F6770
    PORTA = 0b00000000;
    TRISA = 0b00000000;
    WPUA  = 0b00000000;

    PORTB = 0b00000000;
    TRISB = 0b00000000;
    WPUB  = 0b00000000;
#endif

#if defined _SC8F6790 
    PORTA = 0b00000000;
    // TRISA = 0b00000101;
    TRISA = 0b00000100;
    WPUA  = 0b00000000;
    WPDA  = 0b00000000;
    IOCA  = 0b00000000;

    PORTB = 0b00000000;
    TRISB = 0b00000000;
    WPUB  = 0b00000000;
    WPDB  = 0b00000000;
    IOCB  = 0b00000000;
    
    PORTC = 0b00000000;
    TRISC = 0b00000000;
    WPUC  = 0b00000000;
    WPDC  = 0b00000000;
    IOCC  = 0b00000000;
#endif

#if (defined _SC8F073) | (defined _SC8F083)
    PORTA = 0b00100110;
    TRISA = 0b00100110;
    WPUA  = 0b00100110;
    WPDA  = 0b00000000;
    IOCA  = 0b00000000;
    ODCONA= 0b00000000;
    ANSEL0= 0b00000000;

    PORTB = 0b11111100;
    TRISB = 0b00000011;
    PORTB = 0b11111100;
    WPUB  = 0b00000010;
    WPDB  = 0b00000000;
    IOCB  = 0b00000000;
    ODCONB= 0b00000000;
    ANSEL1= 0b00000000;
    
    PORTC = 0b00000000;
    TRISC = 0b00000000;
    WPUC  = 0b00000000;
    ANSEL2= 0b00000000;
#endif

}

